/**
 * Created on 11.03.2012
 */
package com.example.ejb.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author Ciprian Mihalache
 *
 */
@Entity
@Table(name = "junit_demo_user")
public class DbUser implements Serializable {
	private static final long serialVersionUID = -6996626642630003465L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "DB_ID")
	private long dbId;

	@Column(nullable = false)
	private String name;

	private String address;

	private String mail;

	private String phone;

	@Column(nullable = false)
	private String id;

	public long getDbId() {
		return dbId;
	}

	protected void setDbId(long dbId) {
		this.dbId = dbId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("DbUser [ dbId = ");
		sb.append(dbId);
		sb.append(", name = ");
		sb.append(name);
		sb.append(", address = ");
		sb.append(address);
		sb.append(", phone = ");
		sb.append(phone);
		sb.append(", mail = ");
		sb.append(mail);
		sb.append(", id = ");
		sb.append(id);
		return sb.toString();
	}

}
